var viewport = document.querySelector('meta[name=viewport]')
var winWidths = window.innerWidth < 800 ? window.innerWidth : 800
if (isWeixin()) {
    viewport.setAttribute('content', 'width=640,initial-scale=.5,maximum-scale=.5, minimum-scale=.5,user-scalable=no')
}
function isWeixin () {
    var ua = navigator.userAgent.toLowerCase()
    if (ua.match(/MicroMessenger/i) == 'micromessenger') {
        return true
    } else {
        return false
    }
}
document.getElementsByTagName('html')[0].style.fontSize = winWidths / 10 + 'px'
